import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/repair_order_detail_entity.dart';

RepairOrderDetailEntity $RepairOrderDetailEntityFromJson(Map<String, dynamic> json) {
	final RepairOrderDetailEntity repairOrderDetailEntity = RepairOrderDetailEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		repairOrderDetailEntity.code = code;
	}
	final RepairOrderDetailObj? obj = jsonConvert.convert<RepairOrderDetailObj>(json['obj']);
	if (obj != null) {
		repairOrderDetailEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		repairOrderDetailEntity.msg = msg;
	}
	return repairOrderDetailEntity;
}

Map<String, dynamic> $RepairOrderDetailEntityToJson(RepairOrderDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

RepairOrderDetailObj $RepairOrderDetailObjFromJson(Map<String, dynamic> json) {
	final RepairOrderDetailObj repairOrderDetailObj = RepairOrderDetailObj();
	final String? worker = jsonConvert.convert<String>(json['worker']);
	if (worker != null) {
		repairOrderDetailObj.worker = worker;
	}
	final int? repairArea = jsonConvert.convert<int>(json['repairArea']);
	if (repairArea != null) {
		repairOrderDetailObj.repairArea = repairArea;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		repairOrderDetailObj.address = address;
	}
	final String? repairApplicant = jsonConvert.convert<String>(json['repairApplicant']);
	if (repairApplicant != null) {
		repairOrderDetailObj.repairApplicant = repairApplicant;
	}
	final String? phone = jsonConvert.convert<String>(json['phone']);
	if (phone != null) {
		repairOrderDetailObj.phone = phone;
	}
	final int? urgency = jsonConvert.convert<int>(json['urgency']);
	if (urgency != null) {
		repairOrderDetailObj.urgency = urgency;
	}
	final String? fatalType = jsonConvert.convert<String>(json['fatalType']);
	if (fatalType != null) {
		repairOrderDetailObj.fatalType = fatalType;
	}
	final String? fatalMark = jsonConvert.convert<String>(json['fatalMark']);
	if (fatalMark != null) {
		repairOrderDetailObj.fatalMark = fatalMark;
	}
	final List<String>? pics = jsonConvert.convertListNotNull<String>(json['pics']);
	if (pics != null) {
		repairOrderDetailObj.pics = pics;
	}
	final String? time = jsonConvert.convert<String>(json['time']);
	if (time != null) {
		repairOrderDetailObj.time = time;
	}
	final String? state = jsonConvert.convert<String>(json['state']);
	if (state != null) {
		repairOrderDetailObj.state = state;
	}
	final String? acceptorPhone = jsonConvert.convert<String>(json['acceptorPhone']);
	if (acceptorPhone != null) {
		repairOrderDetailObj.acceptorPhone = acceptorPhone;
	}
	return repairOrderDetailObj;
}

Map<String, dynamic> $RepairOrderDetailObjToJson(RepairOrderDetailObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['worker'] = entity.worker;
	data['repairArea'] = entity.repairArea;
	data['address'] = entity.address;
	data['repairApplicant'] = entity.repairApplicant;
	data['phone'] = entity.phone;
	data['urgency'] = entity.urgency;
	data['fatalType'] = entity.fatalType;
	data['fatalMark'] = entity.fatalMark;
	data['pics'] =  entity.pics;
	data['time'] = entity.time;
	data['state'] = entity.state;
	data['acceptorPhone'] = entity.acceptorPhone;
	return data;
}